<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Checks if a given text contains any suspicious characters</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="spoofchecker.construct.html">« Spoofchecker::__construct</a></li>
      <li style="float: right;"><a href="spoofchecker.setallowedlocales.html">Spoofchecker::setAllowedLocales »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="class.spoofchecker.html">Spoofchecker</a></li>
    <li>Checks if a given text contains any suspicious characters</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="spoofchecker.issuspicious" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">Spoofchecker::isSuspicious</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.4.0, PHP 7, PHP 8, PECL intl &gt;= 2.0.0)</p><p class="refpurpose"><span class="refname">Spoofchecker::isSuspicious</span> &mdash; <span class="dc-title">Checks if a given text contains any suspicious characters</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-spoofchecker.issuspicious-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><strong>Spoofchecker::isSuspicious</strong></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$string</code></span>, <span class="methodparam"><span class="type">int</span> <code class="parameter reference">&$errorCode</code><span class="initializer"> = <strong><code>null</code></strong></span></span>): <span class="type">bool</span></div>

  <p class="para rdfs-comment">
   Checks if given string contains any suspicious characters like letters which
   are almost identical visually, but are Unicode characters from different sets.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-spoofchecker.issuspicious-parameters">
  <h3 class="title">参数</h3>
  <dl>
   
    <dt>
<code class="parameter">string</code></dt>

    <dd>

     <p class="para">
      String to test.
     </p>
    </dd>

   
   
    <dt>
<code class="parameter">errorCode</code></dt>

    <dd>

     <p class="para">
      This variable is set by-reference to <span class="type">int</span> containing an error, if there
      was any.
     </p>
    </dd>

   
  </dl>

 </div>


 <div class="refsect1 returnvalues" id="refsect1-spoofchecker.issuspicious-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   Returns <strong><code>true</code></strong> if there are suspicious characters, <strong><code>false</code></strong> otherwise.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-spoofchecker.issuspicious-examples">
  <h3 class="title">范例</h3>
  <p class="para">
   <div class="example" id="example-2471">
    <p><strong>示例 #1 <span class="function"><strong>Spoofchecker::isSuspicious()</strong></span> example</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />$checker&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #0000BB">Spoofchecker</span><span style="color: #007700">();<br /><br /></span><span style="color: #0000BB">$checker</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">isSuspicious</span><span style="color: #007700">(</span><span style="color: #DD0000">'google.com'</span><span style="color: #007700">);&nbsp;</span><span style="color: #FF8000">//&nbsp;FALSE:&nbsp;only&nbsp;ASCII&nbsp;characters<br /><br /></span><span style="color: #0000BB">$checker</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">isSuspicious</span><span style="color: #007700">(</span><span style="color: #DD0000">'Рaypal.com'</span><span style="color: #007700">);&nbsp;</span><span style="color: #FF8000">//&nbsp;TRUE<br />//&nbsp;The&nbsp;first&nbsp;letter&nbsp;is&nbsp;from&nbsp;Cyrylic,&nbsp;not&nbsp;a&nbsp;regular&nbsp;latin&nbsp;"P"</span>
</span>
</code></div>
    </div>

   </div>
  </p>
 </div>

</div></div></div></body></html>